// +----------------------------------------------------------------------
// | desc: global js
// +----------------------------------------------------------------------
// | Created By 2016-10-14
// +----------------------------------------------------------------------
// | Author: zhangliang 
// +----------------------------------------------------------------------

/**
 *desc:初始化加载
 *@param void;
 *@return void;
 */
$(function(){
  //重置rem,1rem=100px
  wap.changeSize();
});

/**
 *desc:构造函数 
 *@param void;
 *@return void;
 */
function Wap(){};

 /**
 *desc:窗口大小改变执行
 *@param void;
 *@return void;
 */
 Wap.prototype.changeSize=function(){
   //重置rem,1rem=100px
   wap.mobileAnswer();
   $(window).resize(function(){
      wap.mobileAnswer();
   });
 };

 /**
 *desc:重置rem,1rem=100px
 *@param void;
 *@return void;
 */
 Wap.prototype.mobileAnswer=function(){
	 var deviceWidth = document.documentElement.clientWidth;
     if(deviceWidth > 750){
         deviceWidth = 750;
     }
     $("html").css("font-size",deviceWidth / 7.5 + 'px');
 };





/**
 *desc:构造函数实例化
 */
var wap = new Wap();